var o = getApp();

Page({
    data: {
        _id: "",
        info: {},
        order: {},
        goods: {}
    },
    onLoad: function(o) {
        o.id && this.setData({
            _id: o.id
        }), this._getData();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    _getData: function() {
        var t = this, n = o.getNetAddresss("finance.income.get-detail");
        n += "&id=" + this.data._id, o._getNetWork({
            url: n,
            success: function(o) {
                var n = o.data;
                1 == n.result ? t._setData(n.data) : console.log(n.msg);
            },
            fail: function(o) {
                console.log(o);
            }
        });
    },
    _setData: function(t) {
        null != t && "" != t && null != t ? o._isTextEmpty(t.commission) ? o._isTextEmpty(t.area_dividend) || this.setData({
            info: t.area_dividend,
            order: t.order,
            goods: t.goods
        }) : this.setData({
            info: t.commission,
            order: t.order,
            goods: t.goods
        }) : wx.showModal({
            title: "提示",
            content: "无详情显示",
            success: function(o) {
                (o.confirm || o.cancel) && wx.navigateBack({
                    delta: 1
                });
            }
        });
    }
});